package cn.xrj.springcloud.controller;

import cn.xrj.springcloud.pojo.Qcpage;
import cn.xrj.springcloud.service.JobInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
public class QcpageConsumerController {
    @Autowired
    JobInfoService jobInfoService;

    @RequestMapping("/consumer/jobinfo/getById/{id}")
    public Qcpage getById(@PathVariable("id")Integer id){
        return jobInfoService.getById(id);
    }

    @RequestMapping("/consumer/jobinfo/getAll")
    public List<Qcpage> getAll(){
        return jobInfoService.getAll();
    }

    @RequestMapping("/consumer/jobinfo/deleteById/{id}")
    public boolean deleteById(@PathVariable("id")Integer id){
         return jobInfoService.deleteById(id);
    }
}
